﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using JM.JCY.Common;
using NCS.IConnect.PolicyInjection.CallHandlers;
using JM.JCY.BusinessComponent;
using JM.JCY.BusinessEntity;
using JM.JCY.DataAccess;


namespace JM.JCY.BusinessFacade
{
    public class AnnounceBF : JCYBusinessFacadeBase<AnnounceBC>, IAnnounce
    {
        public AnnounceBF()
            : base(new AnnounceBC())
        {
        }

        public void UpdateAnnounce(AnnounceDataSet ds)
        {
            this.BusinessComponent.UpdateAnnounce(ds);
        }

        public void UpdateAnnouceSingle(AnnounceDataSet.T_AnnounceDataTable dt)
        {
            this.BusinessComponent.UpdateAnnouceSingle(dt);
        }

        public void UpdateAnnounceReceiverSingle(AnnounceDataSet.T_Announce_ReceiverDataTable dt)
        {
            this.BusinessComponent.UpdateAnnounceReceiverSingle(dt);
        }

        public AnnounceDataSet.T_Announce_ReceiverDataTable GetAnnounceReceiverById(int announceId)
        {

            return this.BusinessComponent.GetAnnounceReceiverById(announceId);
        }

        public AnnounceDataSet.T_Announce_SearchDataTable SearchAnnounce(string subject, string status, string readStatus, DateTime? startDate, DateTime? endDate)
        {
            return this.BusinessComponent.SearchAnnounce(subject, status, readStatus, startDate, endDate);
        }

        public AnnounceDataSet.T_AnnounceDataTable GetAnnounce(int announceId, string subject, string status)
        {

            return this.BusinessComponent.GetAnnounce(announceId, subject, status);
        }

        public AnnounceDataSet.T_Announce_Search_By_UserDataTable SearchAnnounceByUser(string subject, DateTime? startDate, DateTime? endDate, int currentUserId)
        {
            return this.BusinessComponent.SearchAnnounceByUser(subject, startDate, endDate, currentUserId);
        }

        public AnnounceDataSet.T_AnnounceDataTable SearchAnnouncForHome(int count, int receiverId)
        {
            return this.BusinessComponent.SearchAnnouncForHome(count, receiverId);
        }

        public void UpdateAnnounceStatus(int annId, string userName)
        {
            this.BusinessComponent.UpdateAnnounceStatus(annId, userName);
        }
    }
}
